<template>
  <div class="TermsConditions-Container">
    <Search v-model="search" placeholder="Terms and Conditions"> </Search>
    <v-spacer class="pa-2 list">
      <v-col v-for="(text, index) in propList" :key="index">
        {{ index + 1 }}. {{ text }}
      </v-col>
    </v-spacer>
  </div>
</template>
<script lang="ts">
import { Vue, Component, Watch } from "vue-property-decorator";
import Search from "@/components/Quotation/Search/Search.vue";
@Component({
  components: {
    Search,
  },
  props: {
    list: {
      type: Array,
      default: () => [],
    },
  },
})
export default class TermsConditions extends Vue {
  search = "";
  get propList() {
    if (this.search) {
      return this.$props.list.filter((text: string) => {
        return text.indexOf(this.search) >= 0;
      });
    }
    return this.$props.list;
  }
}
</script>
<style lang="scss" scoped>
@import "./TermsConditions.scss";
</style>
